<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<body>

<h:form id="endForm">
	
	
	<p:dialog header="#{estabelecimentoMB.mostrarEstabelecimento.nome}" width="380" height="200" id="modalEndereco" widgetVar="modalEndereco" modal="true">
	
		<h:panelGrid columns="2">
			<h:panelGroup>
			<h:outputLabel styleClass="modalCliente" value="CEP: "></h:outputLabel>
			<p:inputMask styleClass="label_16" value="#{estabelecimentoMB.mostrarEstabelecimento.cep}"   size="10"/>
			<p:commandButton id="buscarCEP" update="rua cidade bairro" styleClass="label_10" action="#{estabelecimentoMB.buscarEnderecoAlterar}" icon="ui-icon-search"></p:commandButton>
			</h:panelGroup>
		</h:panelGrid>
		
		<h:panelGrid columns="4">
			<h:outputLabel styleClass="modalCliente" value="Rua: "></h:outputLabel>
			<p:inputText id="rua" styleClass="label_16" value="#{estabelecimentoMB.mostrarEstabelecimento.rua}" />
			
			<h:outputLabel styleClass="modalCliente" value="Número: "></h:outputLabel>
			<p:inputText value="#{estabelecimentoMB.mostrarEstabelecimento.numero}"  size="3"/>
		</h:panelGrid>
		
		<h:panelGrid columns="2">
			<h:outputLabel styleClass="modalCliente" value="Bairro: "></h:outputLabel>
			<p:inputText id="bairro" style="margin-left:4px;" value="#{estabelecimentoMB.mostrarEstabelecimento.bairro}" />
		</h:panelGrid>
		
		<h:panelGrid columns="4">
			<h:outputLabel styleClass="modalCliente" value="Cidade: "></h:outputLabel>
			<p:inputText id="cidade" value="#{estabelecimentoMB.mostrarEstabelecimento.cidade}" />
			
			<h:outputLabel styleClass="modalCliente" value="Estado: "></h:outputLabel>
			<p:inputText value="#{estabelecimentoMB.mostrarEstabelecimento.uf}" size="10" />
		</h:panelGrid>
		<br></br>
		<p:commandButton style="margin-left:280px;" value="Alterar" action="#{estabelecimentoMB.alterarEndereco}" oncomplete="modalEndereco.hide()"></p:commandButton>
		
	</p:dialog>
</h:form>	
</body>
</html>
